<?php
/**
 * @copyright     Copyright 2013, Flash CMM
 * @link          http://flashcmm.com
 * @package       Cake.View.Layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */

$cakeDescription = __d('cake_dev', 'Flash CMM');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<?php echo $this->Html->charset(); ?>
		<title>
			<?php echo $cakeDescription ?>:
			<?php echo $title_for_layout; ?>
		</title>
		<?php
			echo $this->Html->meta('icon');
			
			echo $this->fetch('meta');

			echo $this->Html->css('libs/bootstrap.min');
			
			echo $this->Html->css('libs/animate.min');
			echo $this->Html->css('libs/bootstrap-glyphicons');
			echo $this->Html->css('core');

			echo $this->fetch('css');
			
			
			
			echo $this->fetch('script');
		?>
	</head>

	<body >
		
		<?php echo $this->element('menu/barra_menu'); ?>

		<div id="content" class="container">
			<div class="row cl-menu-principal">
				<div class="col-lg-3 menu-principal">

					<div class="list-group info-user-feed">
						<div class="row">
							<div class="col-lg-4">
					  			<a href="" class='imagem-menu-principal'>
					  				<?php if($this->User->Photo() == ''){?>
					  					<img src='/img/perfil.jpg' />
					  				<?php }  else{ ?>
										<img src='/img/users/<?php echo $this->User->Photo() ?>'/>
					  				<?php } ?>
					  			</a>
				  			</div>
				  			<div class="col-lg-8">
				    			<p class="name"><a href="/@<?php echo $this->User->Username()?>"> <?php echo $this->User->firstName().' '.$this->User->lastName(); ?> </a>
				    			<p class="edit-perfil"><a href="/settings"> <small> Editar meu perfil </small></a>
				    		</div>
				    	</div>
					</div>
					
					

					<div class="list-group cmm-recent-att">
						<a class="list-group-item" href="#"> <strong>Minhas Comunidades</strong></a>
						<?php

							foreach ($this->Community->userCommunities($this->User->id()) as $communityUser) 
							{ 
						?>
						<a class="list-group-item" href="/!<?php echo $communityUser['result']['community_url']; ?>"> <?php echo $communityUser['result']['community_name']; ?><!--<span class="badge red">9</span> --></a>
					
					<?php } ?>
					</div>
					
				</div>
				<div class="col-lg-9 list-feed">
					<?php echo $this->fetch('content'); ?>
				</div>
				
			
			</div>
		</div><!-- #header .container -->
		
		<footer class="container " id="rodape">
			<ul class="nav nav-pills">
				<li><a href="#">Sobre</a></li>		
				<li><a href="#">Criar Comunidade	</a></li>	
				<li><a href="#">Privacidade	</a></li>	
				<li><a href="#">Termos	</a></li>	
				<li><a href="#">Ajuda</a></li>	
				<li><a href="#">Feedback</a></li>	
			</ul>
			<span>Flash CMM © 2013 · Brasil</span>
		</footer><!-- #footer .container -->
		<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
		<?php 
		
			echo $this->Html->script('libs/jquery');
			echo $this->Html->script('libs/typeahead.min');
			echo $this->Html->script('libs/bootstrap.min');
			echo $this->Html->script('ckeditor/ckeditor.js');
    		echo $this->Html->script('ckfinder/ckfinder.js');
			
			echo $this->Html->script('app');
		?>
		
				
	</body>

</html>